@extends('public.admin.layout') 
@section('header')


<section class="content-header">
    <h1>
        内容管理
        <small>Preview of UI elements</small>
    </h1>
    <ol class="breadcrumb">
        <li><a href="{{route('admin.novel')}}"><i class="fa fa-dashboard"></i> 所有小说</a></li>
        <li><a href="#">内容管理</a></li>
    </ol>
</section>
@endsection
 
@section('content')
<div class="row">
    <div class="col-sm-12">
        <button type="button" class="btn  btn-primary btn-sm" onclick="window.location='{{route('admin.content.create',['id'=>Request()->id??''])}}'">
                    新增
            </button>
        <table id="example2" class="table table-bordered table-hover dataTable" role="grid">
            <thead>
                <tr role="row">

                    <th><input type="checkbox" value="" class="fancy" id="selectAll" onClick="selectAllCheckBox('product',this.checked)"
                        />内容 ID</th>
                    <th>内容标题</th>
                    <th>所属分卷</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                @foreach($list as $content)
                <tr role="row" class="data-row">

                    <td><input type="checkbox" id="{{$content->id}}" class="fancy" />{{$content->id}}
                    </td>
                    <td>{{$content->con_name}}</td>
                    <td>{{$content->vol->volname}}</td>

                    <td><button type="button" class="btn  btn-primary btn-sm" id="editBtn" onclick="window.location='{{route('admin.content.edit',['id'=>$content->id??''])}}'">
                                编辑
                        </button><button type="button" class="btn btn-warning btn-sm ml5" id='deletBtn'>
                                删除
                        </button>
                    </td>
                </tr>
                @endforeach

            </tbody>
        </table>

        {{$list->links()}}
    </div>
</div>
@endsection
 
@section('script')
<script>

</script>
@endsection